﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;

namespace CodeGame
{
    class MenuState : State
    {
        private float Ring1 = 180.0f;
        private float Ring2 = 0.0f;

        public override void Draw()
        {
            Singletons.Content.DrawImage("ring", ConfigManager.WindowWidth / 2, ConfigManager.WindowHeight / 2,
                MathHelper.ToRadians(this.Ring1), 2.0f, Singletons.EntryText);
            Singletons.Content.DrawImage("ring", ConfigManager.WindowWidth / 2, ConfigManager.WindowHeight / 2,
                MathHelper.ToRadians(this.Ring2), 1.0f, Singletons.OldEntryColor);
            Singletons.Content.DrawText("title", "CodeGame", ConfigManager.WindowWidth - 250, ConfigManager.WindowHeight - 66, Singletons.EntryText);
        }

        public override void Update()
        {
            this.Ring1 -= 1.0f;
            if (this.Ring1 < 0f) 
            {
                this.Ring1 = 360.0f;
            }
            this.Ring2 += 2.0f;
            if (this.Ring2 > 360f)
            {
                this.Ring2 = 0f;
            }
        }
    }
}
